//
//  UserViewModel.swift
//  SwiftRx研究
//
//  Created by 世霖 on 2020/7/16.
//  Copyright © 2020 世霖. All rights reserved.
//

import UIKit
import RxCocoa
import RxSwift

struct  UserViewModel {
  let userName  = Variable("guest")
    
    lazy var userInfo = {
       
        return self.userName.asObservable()
            .map {
                $0 == "hange" ? "管理员":"葡萄皮你买个"
        }.share(replay: 1)
    }()
    
}
